import request from '@/utils/request'

const api = {
  initialGrantList: '/api/incentiveGrant/initial',
  grantIncentive: '/api/incentiveGrant/grant',
  updateIncentive: '/api/incentiveGrant/update',
  deleteIncentive: '/api/incentiveGrant/delete' // 绩效分配
}

export default api
// getRelatedVersions

export function initialGrantList (parameter) {
  return request({
    url: api.initialGrantList,
    method: 'post',
    config: 'x-www-form-urlencoded',
    params: parameter
  })
}

export function grantIncentive (parameter) {
  return request({
    url: api.grantIncentive,
    method: 'post',
    config: 'x-www-form-urlencoded',
    params: parameter
  })
}

export function updateIncentive (parameter) {
  return request({
    url: api.updateIncentive,
    method: 'post',
    config: 'x-www-form-urlencoded',
    params: parameter
  })
}

export function deleteIncentive (parameter) {
  return request({
    url: api.deleteIncentive,
    method: 'post',
    config: 'x-www-form-urlencoded',
    params: parameter
  })
}
